home *** CD-ROM | disk | FTP | other *** search
/ MacFormat España 27 / MacFormat n. 27 (Spain) / Mac Format 26.bin / Shareware / Juegos / numerarium / numerarium.dxr / 00117.ls < prev    next >
Encoding:
Text File  |  1997-02-16  |  2.4 KB  |  66 lines

  1. global toDrawFromSet, lengthtoDrawFromSet, nrOfStims, stimSet, targetnr, bestresultSoFar, bestresultSoFarStr, nrofcalculations, nrbuttontable, currentStep, currentInputStatus, zerobuttonsnr, zerooperatorsnr, firstbuttonloch, hdistancebetweenbuttons, firstbuttonlocv, firstnrloch, firstnrlocv, vdistancebetweenbuttons, zeroClearsnr, operatorList, operand1, operand2, operator, operatorindex, tempoperatorindex, heaven, tempresultbuttonsnr, tempresultnrsnr, connectorsnr, tempoperatorsnr, spinnersnr, connectorlocs, connectorcastnums, opconnectorcastnums, calcIsRunningP, calculatorsnr, nrOfCalcsSnr, nrOfCalcsLoc, foundItIsSalient, foundItButtonNr, clockIsActiveP, fillbarsnr, timeAtReset, ticksPassed, maxlengthFillbar, maxsecssnr, deadlinePassed, nrOfSecsInMAxSecs, clocksnr, timeOutLinesnr, menusnr, score, hscoreFromFile, timeOnStartCalculator, calcAlwaysP, menuVisibleP, wrappedHOffset, wrappedVOffset, scorepossibleThisRoundP, lastbutton, operand2index, findProblemInDatabaseP, selectableProblems, fakesolution, justAborted, firstabortprocessed, easyP, minusalertGivenP, dividealertGivenP, initializedP
  2.  
  3. on feedbackForSpinning
  4.   set the castNum of sprite spinnersnr to cast "dicescoop"
  5.   set the loc of sprite spinnersnr to point(505, 103)
  6.   updateStage()
  7.   waitawhile(20)
  8.   set the castNum of sprite spinnersnr to cast "shaking"
  9.   puppetSound("spin")
  10.   repeat with i = 1 to 4
  11.     shake(i, 8)
  12.   end repeat
  13.   updateStage()
  14. end
  15.  
  16. on shake i, wt
  17.   if (i mod 2) = 1 then
  18.     set the loc of sprite spinnersnr to point(426, 48)
  19.   else
  20.     set the loc of sprite spinnersnr to point(422, 28)
  21.   end if
  22.   updateStage()
  23.   waitawhile(wt)
  24. end
  25.  
  26. on createbuttons
  27.   put "enter create..." & the ticks
  28.   set nrbuttontable to []
  29.   repeat with n = 1 to nrOfStims
  30.     add(nrbuttontable, [])
  31.   end repeat
  32.   repeat with s = 1 to nrOfStims
  33.     repeat with m = 1 to nrOfStims
  34.       createbutton(s, m)
  35.     end repeat
  36.     shake(s)
  37.   end repeat
  38.   put "exit create..." & the ticks
  39. end
  40.  
  41. on createbutton s, m
  42.   set newone to birth(script "nrbutton parent script", s, m)
  43.   add(getAt(nrbuttontable, s), newone)
  44. end
  45.  
  46. on resetbuttons
  47.   put "enter reset..." & the ticks
  48.   repeat with s = 1 to nrOfStims
  49.     repeat with m = 1 to nrOfStims
  50.       resetbutton(s, m)
  51.     end repeat
  52.     shake(s)
  53.   end repeat
  54.   put "exit reset..." & the ticks
  55. end
  56.  
  57. on resetbutton s, m
  58.   set whichObject to getAt(getAt(nrbuttontable, s), m)
  59.   resetAllProps(whichObject)
  60. end
  61.  
  62. on gameISOver
  63.   go("blank")
  64.   halt()
  65. end
  66.